Optimal. Leaf size=243 \[ \frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e-\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e+\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}+\frac {n \text {Li}_2\left (\frac {2 f (a+b x)}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {n \text {Li}_2\left (\frac {2 f (a+b x)}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 243, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2465, 2441,
2440, 2438} \begin {gather*} \frac {n \text {PolyLog}\left (2,\frac {2 f (a+b x)}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {n \text {PolyLog}\left (2,\frac {2 f (a+b x)}{2 a f-b \left (\sqrt {e^2-4 d f}+e\right )}\right )}{\sqrt {e^2-4 d f}}+\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (-\sqrt {e^2-4 d f}+e+2 f x\right )}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (\sqrt {e^2-4 d f}+e+2 f x\right )}{2 a f-b \left (\sqrt {e^2-4 d f}+e\right )}\right )}{\sqrt {e^2-4 d f}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2438
Rule 2440
Rule 2441
Rule 2465
Rubi steps
\begin {align*} \int \frac {\log \left (c (a+b x)^n\right )}{d+e x+f x^2} \, dx &=\int \left (\frac {2 f \log \left (c (a+b x)^n\right )}{\sqrt {e^2-4 d f} \left (e-\sqrt {e^2-4 d f}+2 f x\right )}-\frac {2 f \log \left (c (a+b x)^n\right )}{\sqrt {e^2-4 d f} \left (e+\sqrt {e^2-4 d f}+2 f x\right )}\right ) \, dx\\ &=\frac {(2 f) \int \frac {\log \left (c (a+b x)^n\right )}{e-\sqrt {e^2-4 d f}+2 f x} \, dx}{\sqrt {e^2-4 d f}}-\frac {(2 f) \int \frac {\log \left (c (a+b x)^n\right )}{e+\sqrt {e^2-4 d f}+2 f x} \, dx}{\sqrt {e^2-4 d f}}\\ &=\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e-\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e+\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {(b n) \int \frac {\log \left (\frac {b \left (e-\sqrt {e^2-4 d f}+2 f x\right )}{-2 a f+b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{a+b x} \, dx}{\sqrt {e^2-4 d f}}+\frac {(b n) \int \frac {\log \left (\frac {b \left (e+\sqrt {e^2-4 d f}+2 f x\right )}{-2 a f+b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{a+b x} \, dx}{\sqrt {e^2-4 d f}}\\ &=\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e-\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e+\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {n \text {Subst}\left (\int \frac {\log \left (1+\frac {2 f x}{-2 a f+b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{x} \, dx,x,a+b x\right )}{\sqrt {e^2-4 d f}}+\frac {n \text {Subst}\left (\int \frac {\log \left (1+\frac {2 f x}{-2 a f+b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{x} \, dx,x,a+b x\right )}{\sqrt {e^2-4 d f}}\\ &=\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e-\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e+\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}+\frac {n \text {Li}_2\left (\frac {2 f (a+b x)}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {n \text {Li}_2\left (\frac {2 f (a+b x)}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 324, normalized size = 1.33 \begin {gather*} \frac {-2 \sqrt {e^2-4 d f} n \tan ^{-1}\left (\frac {e+2 f x}{\sqrt {-e^2+4 d f}}\right ) \log (a+b x)+2 \sqrt {e^2-4 d f} \tan ^{-1}\left (\frac {e+2 f x}{\sqrt {-e^2+4 d f}}\right ) \log \left (c (a+b x)^n\right )+\sqrt {-e^2+4 d f} n \log (a+b x) \log \left (1-\frac {2 f (a+b x)}{-b e+2 a f+b \sqrt {e^2-4 d f}}\right )-\sqrt {-e^2+4 d f} n \log (a+b x) \log \left (1+\frac {2 f (a+b x)}{-2 a f+b \left (e+\sqrt {e^2-4 d f}\right )}\right )+\sqrt {-e^2+4 d f} n \text {Li}_2\left (\frac {2 f (a+b x)}{2 a f+b \left (-e+\sqrt {e^2-4 d f}\right )}\right )-\sqrt {-e^2+4 d f} n \text {Li}_2\left (\frac {2 f (a+b x)}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {-\left (e^2-4 d f\right )^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.91, size = 689, normalized size = 2.84
method | result | size |
risch | \(\frac {2 b \left (\ln \left (\left (b x +a \right )^{n}\right )-n \ln \left (b x +a \right )\right ) \arctan \left (\frac {2 \left (b x +a \right ) f -2 a f +b e}{\sqrt {4 b^{2} d f -b^{2} e^{2}}}\right )}{\sqrt {4 b^{2} d f -b^{2} e^{2}}}+\frac {b n \ln \left (b x +a \right ) \ln \left (\frac {-2 \left (b x +a \right ) f +2 a f -b e +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}{2 a f -b e +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}\right )}{\sqrt {-4 b^{2} d f +b^{2} e^{2}}}-\frac {b n \ln \left (b x +a \right ) \ln \left (\frac {2 \left (b x +a \right ) f -2 a f +b e +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}{-2 a f +b e +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}\right )}{\sqrt {-4 b^{2} d f +b^{2} e^{2}}}+\frac {b n \dilog \left (\frac {-2 \left (b x +a \right ) f +2 a f -b e +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}{2 a f -b e +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}\right )}{\sqrt {-4 b^{2} d f +b^{2} e^{2}}}-\frac {b n \dilog \left (\frac {2 \left (b x +a \right ) f -2 a f +b e +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}{-2 a f +b e +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}\right )}{\sqrt {-4 b^{2} d f +b^{2} e^{2}}}-\frac {i \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \pi \mathrm {csgn}\left (i c \left (b x +a \right )^{n}\right )^{3}}{\sqrt {4 d f -e^{2}}}+\frac {i \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \pi \mathrm {csgn}\left (i c \left (b x +a \right )^{n}\right )^{2} \mathrm {csgn}\left (i c \right )}{\sqrt {4 d f -e^{2}}}+\frac {i \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \pi \mathrm {csgn}\left (i c \left (b x +a \right )^{n}\right )^{2} \mathrm {csgn}\left (i \left (b x +a \right )^{n}\right )}{\sqrt {4 d f -e^{2}}}-\frac {i \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \pi \,\mathrm {csgn}\left (i c \left (b x +a \right )^{n}\right ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (b x +a \right )^{n}\right )}{\sqrt {4 d f -e^{2}}}+\frac {2 \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \ln \left (c \right )}{\sqrt {4 d f -e^{2}}}\) | \(689\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\ln \left (c\,{\left (a+b\,x\right )}^n\right )}{f\,x^2+e\,x+d} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________